<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditSubmittedAssignmentTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_submittedAssignmentId}" for="submittedAssignmentId" />
                    <h:inputText id="submittedAssignmentId" value="#{submittedAssignmentController.selected.submittedAssignmentId}" title="#{bundle.EditSubmittedAssignmentTitle_submittedAssignmentId}" required="true" requiredMessage="#{bundle.EditSubmittedAssignmentRequiredMessage_submittedAssignmentId}"/>
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_urlFile}" for="urlFile" />
                    <h:inputText id="urlFile" value="#{submittedAssignmentController.selected.urlFile}" title="#{bundle.EditSubmittedAssignmentTitle_urlFile}" required="true" requiredMessage="#{bundle.EditSubmittedAssignmentRequiredMessage_urlFile}"/>
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_createdDate}" for="createdDate" />
                    <h:inputText id="createdDate" value="#{submittedAssignmentController.selected.createdDate}" title="#{bundle.EditSubmittedAssignmentTitle_createdDate}" required="true" requiredMessage="#{bundle.EditSubmittedAssignmentRequiredMessage_createdDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_isDownloaded}" for="isDownloaded" />
                    <h:inputText id="isDownloaded" value="#{submittedAssignmentController.selected.isDownloaded}" title="#{bundle.EditSubmittedAssignmentTitle_isDownloaded}" required="true" requiredMessage="#{bundle.EditSubmittedAssignmentRequiredMessage_isDownloaded}"/>
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_mark}" for="mark" />
                    <h:inputText id="mark" value="#{submittedAssignmentController.selected.mark}" title="#{bundle.EditSubmittedAssignmentTitle_mark}" />
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_note}" for="note" />
                    <h:inputText id="note" value="#{submittedAssignmentController.selected.note}" title="#{bundle.EditSubmittedAssignmentTitle_note}" />
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_studentId}" for="studentId" />
                    <h:selectOneMenu id="studentId" value="#{submittedAssignmentController.selected.studentId}" title="#{bundle.EditSubmittedAssignmentTitle_studentId}" required="true" requiredMessage="#{bundle.EditSubmittedAssignmentRequiredMessage_studentId}">
                        <f:selectItems value="#{studentController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditSubmittedAssignmentLabel_assignmentId}" for="assignmentId" />
                    <h:selectOneMenu id="assignmentId" value="#{submittedAssignmentController.selected.assignmentId}" title="#{bundle.EditSubmittedAssignmentTitle_assignmentId}" required="true" requiredMessage="#{bundle.EditSubmittedAssignmentRequiredMessage_assignmentId}">
                        <f:selectItems value="#{assignmentController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{submittedAssignmentController.update}" value="#{bundle.EditSubmittedAssignmentSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditSubmittedAssignmentViewLink}"/>
                <br />
                <h:commandLink action="#{submittedAssignmentController.prepareList}" value="#{bundle.EditSubmittedAssignmentShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditSubmittedAssignmentIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
